package com.ngc.mall.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ngc.mall.domain.OrderDomain;
import com.ngc.mall.dto.DeliveryDTO;
import com.ngc.mall.dto.OrderDTO;
import com.ngc.mall.dto.OrderFilterDTO;
import com.ngc.mall.logic.OrderChecker;
import com.ngc.mall.vo.*;

import java.util.List;

/**
 * 订单
 *
 * @author : Chen Xiao Lin
 * @Date : 2023/5/5 17:46
 **/

public interface IOrderService extends IService<OrderDomain> {

    Long createOrder(OrderDTO orderDTO, Long uid, OrderChecker orderChecker);

    OrderDomain getOrderDetailById(Long id);

    PagingVO<OrderDomain> search(OrderFilterDTO dto,int start,int count);

    PagingVO<OrderDomain> getMySelfByStatus(int status, int start, int count);

    PagingVO<OrderDomain> getByStatus(int status, int start, int count);

    Boolean updateStatusToReceive(Long uid,Long oid);

    OrderChecker isOk(OrderDTO orderDTO, Long userId);

    void cancel(Long oid);

    Boolean updateStatusToDelivered(Long oid, DeliveryDTO deliveryDTO);

    OrderCountVO getMyOrderCountByStatus(Long uid);

    OrderOverviewVO getOrderOverview();

    OrderSummaryVO queryOrderByDateRange(String startDate,String endDate);

    OrderReportSummaryVO queryOrderByDateType(int type);

    List<OrderDomain> getOrderByMemberId(Long memberId);
}
